import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const routes = [
  {
    path: '/login',
    name: 'Login',
    hidden: true,
    component: () => import(/* webpackChunkName: 'home' */ '../views/login/index.vue')
  },
  {
    path: '/Home',
    name: 'Home',
    component: () => import('../views/Home'),
    children: [
      {
        path: '/workTime',
        name: 'workTime',
        component: () => import('../views/WorkTime.vue')
      }, {
        path: '/fileUpload',
        name: 'fileUpload',
        component: () => import('../views/FileUpload')
      }, {
        path: '/ioNumberInfo',
        name: 'ioNumberInfo',
        component: () => import('../views/IoNumberInfo')
      }, {
        path: '/userInfo',
        name: 'userInfo',
        component: () => import('../views/userInfo')
      }, {
        path: '/userLog',
        name: 'userLog',
        component: () => import('../views/userLog')
      }
    ]
  }, {
    path: '/',
    name: 'login',
    component: () => import('../views/login/index')
  },
  /*{
    path: "/",
    name: "index",
    component: () => import("../views/wenjuan")
  },*/
  {
    path: '/about',
    name: 'About',
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: () =>
      import(/* webpackChunkName: "about" */ '../views/About.vue')
  }]

const router = new VueRouter({
  routes,
})

export default router
